package com.xyz.study.spring.event;

import org.springframework.context.ApplicationEvent;

/**
 * TestSpringEvent
 *
 * @author xyz
 * @version 1.0.0
 * @since 2021/7/23
 */
public class TestSpringEvent extends ApplicationEvent {
    private static final long serialVersionUID = 1L;
    private EventData eventData;

    public TestSpringEvent(EventData eventData) {
        super(eventData);
        this.eventData = eventData;
    }

    public EventData getEventData() {
        return eventData;
    }

    public static class EventData{
        private String eventId;

        private String name;

        public EventData(String eventId, String name) {
            this.eventId = eventId;
            this.name = name;
        }

        public String getEventId() {
            return eventId;
        }

        public String getName() {
            return name;
        }

        public void setEventId(String eventId) {
            this.eventId = eventId;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}
